Skip to content

feat: Mempool transaction verifier service#15

Open
toruguera wants to merge 4 commits intofeat/mempool-slots-execution-servicefrom
feat/mempool-transaction-verifier-service
Open

feat: Mempool transaction verifier service#15
toruguera wants to merge 4 commits intofeat/mempool-slots-execution-servicefrom
feat/mempool-transaction-verifier-service

Conversation

@toruguera
Copy link

Implement Verifier Service and System Integration

Summary

Implements the Verifier Service to monitor and verify transactions on the Stellar network, and integrates the complete mempool system into the application startup.

Changes

Verifier Service

  • verifier.service.ts: Pure function verifyTransactionOnNetwork() that checks transaction status on Stellar network
  • verifier.process.ts: Verifier class with:
    • Automatic verification loop at configurable intervals
    • Monitors UNVERIFIED transactions
    • Updates transaction status to VERIFIED or FAILED
    • Updates bundle status to COMPLETED or PENDING (for retry)
  • verifier.types.ts: Types for verification results
  • verifier.errors.ts: Specific error classes

System Integration

  • mempool/index.ts: Extended with:
    • Executor and Verifier singleton instances
    • initializeMempoolSystem() function for complete system initialization
    • shutdownMempoolSystem() for graceful shutdown
    • Periodic TTL check for bundle expiration
  • main.ts: Integrated mempool system initialization before HTTP server startup with graceful shutdown handlers

Features

  • Automatic transaction verification on Stellar network
  • Status updates for transactions and bundles based on verification results
  • Graceful shutdown of all services (Executor, Verifier, TTL check)
  • Periodic bundle expiration check
  • Complete system lifecycle management

Files Created

  • src/core/service/verifier/verifier.types.ts
  • src/core/service/verifier/verifier.errors.ts
  • src/core/service/verifier/verifier.service.ts
  • src/core/service/verifier/verifier.process.ts

Files Modified

  • src/core/mempool/index.ts
  • src/main.ts

Environment Variables

Requires new variables:

  • MEMPOOL_VERIFIER_INTERVAL_MS
  • MEMPOOL_TTL_CHECK_INTERVAL_MS

@toruguera toruguera requested a review from fazzatti January 12, 2026 22:18
@toruguera toruguera self-assigned this Jan 12, 2026
@toruguera toruguera changed the title Feat/mempool transaction verifier service feat: Mempool transaction verifier service Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant